package com.southwind.springboottest.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
//import lombok.Data;
import java.io.Serializable;
import java.sql.Date;

//@Data
@TableName("Bookdb")//如果不加这个注解，则默认将实体类全改为小写字母，然后到数据库中去寻找相应的表
public class Book implements Serializable{
    @TableId(value = "bookid",type = IdType.AUTO)//设置主键自增
    private Integer id;

    //当实体类字段与数据库项不一致时，用tablefield注解
    @TableField(value = "bookname")
    private String name;

    @TableField(value = "bookauthor")
    private  String author;

    private Integer bookyear;

    private Integer bookprice;

    private Integer bookstore;

    private String status;

    public Integer getBookyear() {
        return bookyear;
    }

    public void setBookyear(Integer bookyear) {
        this.bookyear = bookyear;
    }

    public Integer getBookprice() {
        return bookprice;
    }

    public void setBookprice(Integer bookprice) {
        this.bookprice = bookprice;
    }

    public Integer getBookstore() {
        return bookstore;
    }

    public void setBookstore(Integer bookstore) {
        this.bookstore = bookstore;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                '}';
    }
}
